<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">
<h:body>
	<ui:composition template="/WEB-INF/templates/template.xhtml">
		<ui:define name="content">
			<h:form id="form">
				<p:growl id="growl" sticky="false" autoUpdate="true"
					showDetail="true" />
				<p:panel header="#{msg.title_cat_role_parent}">
					<p:pickList value="#{npr_edit_controller.dualListModel}"
						converter="roleConverter" var="curr_role"
						itemLabel="#{curr_role.roleName}" itemValue="#{curr_role}"
						id="picklist">
						<f:facet name="sourceCaption">
							<h:outputText value="#{msg.unassigned}" />
						</f:facet>
						<f:facet name="targetCaption">
							<h:outputText value="#{msg.assigned}" />
						</f:facet>
					</p:pickList>
					<p:commandButton value="#{msg.accept}" icon="ui-icon-pencil"
						onclick="PF('dlgAccept').show();" />
					<p:commandButton value="#{msg.cancel}" icon="ui-icon-close"
						action="#{npr_edit_controller.onCancel}" />
				</p:panel>
			</h:form>
			<!-- Panel for delete -->
			<p:confirmDialog widgetVar="dlgAccept" resizable="false"
				header="#{msg.action_confirm}" message="#{msg.update_item_message}">
				<h:form id="formUpdate">
					<p:commandButton value="#{msg.accept}"
						styleClass="ui-confirmdialog-yes" icon="ui-icon-check"
						oncomplete="PF('dlgAccept').hide();"
						action="#{npr_edit_controller.onSave}" />
					<p:commandButton value="#{msg.cancel}"
						onclick="PF('dlgAccept').hide();" immediate="true"
						action="#{npr_edit_controller.onSaveCancel}"
						styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
				</h:form>
			</p:confirmDialog>
			<!-- End panel for delete -->
		</ui:define>
	</ui:composition>

</h:body>
</html>